<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    
    /*
        indexedDB
        1.创建
     */
    let db, request, version = 1;
    request = indexedDB.open('admin', version)
    request.onerror = e => console.log('fail', e.target.errorCode)
    request.onsuccess = e => {
        console.log('ok')
        db = e.target.result;
    }
    
    /*
        2.对象存储
     */
    
    let user = {
        username:'007',
        firstName:'James',
        lastName:'Bond',
        password:'foo'
    }
    
    
    
    
</script>
</body>
</html>